package com.lagou.cl.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * @author 程  林
 * @date 2020-04-01 10:20
 * @description //数据源
 * @since V1.0.0
 */
public class DruidUtils {

    /**
     * 单例
     */

    private DruidUtils(){
    }

    private static DruidDataSource druidDataSource = new DruidDataSource();


    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://127.0.0.1:3306/lagou");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("toor");

    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }

}
